package com.usabb.enums;

import com.usabb.domain.AmenityDO;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

@AllArgsConstructor
@Getter
public enum AmenityEnum {

    COMMUNITY(1L, "社区配套"),
    VILLA_FACILITY(2L, "别墅设施"),
    ROOM_FACILITY(3L, "房间设施"),
    BABY_ROOM(4L, "婴儿房设施");

    private Long type;
    private String desc;

    public static boolean isCommunity(AmenityDO input) {
        if (Objects.isNull(input)) {
            return false;
        }

        return COMMUNITY.type.equals(input.getTypeId());
    }
    public static boolean isVillaFacility(AmenityDO input) {
        if (Objects.isNull(input)) {
            return false;
        }

        return VILLA_FACILITY.type.equals(input.getTypeId());
    }
    public static boolean isRoomFacility(AmenityDO input) {
        if (Objects.isNull(input)) {
            return false;
        }

        return ROOM_FACILITY.type.equals(input.getTypeId());
    }
    public static boolean isBabyRoom(AmenityDO input) {
        if (Objects.isNull(input)) {
            return false;
        }

        return BABY_ROOM.type.equals(input.getTypeId());
    }

}
